import { useState } from "react";

const Counter = () => {
    const [count, setCount] = useState(0);
    return (
        <>
            <div className='alert alert-danger'>当前counts的值为：{count}</div>
            <button
                className='btn btn-danger'
                onClick={() => setCount(count + 1)}
            >
                增加
            </button>
        </>
    );
};

export default Counter;
